<script>
import { useUserStore } from '@/store/index.js'
import { onLoad } from '@dcloudio/uni-app'

export default {
	onLaunch: function () {
		console.warn('当前组件仅支持 uni_modules 目录结构 ，请升级 HBuilderX 到 3.1.0 版本以上！')
		console.log('App Launch')
		
		// 初始化用户状态
		const userStore = useUserStore()
		userStore.initUserState()
	},
	onShow: function () {
		console.log('App Show')
	},
	onHide: function () {
		console.log('App Hide')
	}
}
</script>

<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
@import '@/static/fonts/misans.css';

// 设置整个项目的背景色
page {
	background-color: #fff;
}
// 导航栏
.nav-bar {
	width: 100%;
	display: flex;
	margin: 0 auto;
}

.back-btn {
	width: 48rpx;
	height: 48rpx;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nav-tabs {
	display: flex;
	gap: 64rpx;
}

.tab-item {
	font-size: 36rpx;
	position: relative;
	padding: 16rpx 0;
	cursor: pointer;
}

.tab-item text {
	font-size: 32rpx;
	color: #000;
	font-weight: 600;
}

/* #endif */
.example-info {
	font-size: 14px;
	color: #333;
	padding: 10px;
}

.title-ellipsis {
	font-size: 32rpx;
	font-weight: bold;
	color: #000000;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-all;
	line-height: 1.3;
}

.single-ellipsis {
	font-size: 32rpx;
	font-weight: bold;
	color: #000000;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	word-break: break-all;
}

.page-container {
	height: 100vh;
}

.scrollable-content {
	flex: 1;
	overflow-y: auto;
	position: relative;
	z-index: 1;
}

.example-info {
	font-size: 14px;
	color: #333;
	padding: 10px;
}

.flex-1 {
	flex: 1;
	min-width: 0;
}

.flex {
	display: flex;
}

.fw-w {
	flex-wrap: wrap;
}

.cursor {
	cursor: pointer;
}

.fw-nw {
	flex-wrap: nowrap;
}

.fd-r {
	flex-direction: row;
}

.fd-c {
	flex-direction: column;
}

.fd-rr {
	flex-direction: row-reverse;
}

.ai-c {
	align-items: center;
}

.ai-fd {
	align-items: flex-end;
}

.ai-fs {
	align-items: flex-start;
}

.ai-bl {
	align-items: baseline;
}

.jc-c {
	justify-content: center;
}

.jc-sb {
	justify-content: space-between;
}

.jc-sa {
	justify-content: space-around;
}

.jc-fd {
	justify-content: flex-end;
}

.jc-fs {
	justify-content: flex-start;
}
</style>
